1. Field of the Invention
The present invention relates to an image coding apparatus, an image coding method, an image decoding apparatus, an image decoding method, and a storage medium. More particularly, the present invention relates to a coding/decoding method of a quantization matrix in an image.
2. Description of the Related Art
As a compression recording standard of a moving image, there is known H.264/MPEG-4 AVC (hereinafter referred to as H.264). (ITU-T H.264 (March 2010) Advanced video coding for generic audiovisual services) Regarding H.264, each element of a quantization matrix can be changed into an arbitrary value by coding scaling list information. According to chapter 7.3.2.1.1.1 of H.264, by adding a delta scale being a difference value between an element and the previous element, each element of the quantization matrix can take an arbitrary value.
Regarding H.264, a delta scale, which is the above-described difference value, is coded by a method called signed Exp-Golomb coding illustrated in FIG. 5A. For example, if the difference between an element in the matrix and its previous element is 0, a binary code 1 is coded. If the difference is −2, a binary code 00101 is coded. According to this coding method, the length of the binary code is increased as the absolute value of the value to be coded is increased. Thus, regardless of whether the difference value is a negative value or a positive value, if they have the same absolute value, they have the same code length.
Further, regarding H.264, elements of the quantization matrix are scanned in the direction from the element at the upper left corner of the two-dimensional quantization matrix, which corresponds to a low frequency component, to the element at the bottom right corner, which corresponds to a high frequency component. Generally, in performing image coding, elements corresponding to low frequency components are reduced and elements corresponding to high frequency components are increased so that they match the visual feature of the user. Thus, the value of the element of the scanned quantization coefficient at the lower right is greater than the value of the element at the upper left. Thus, regarding the difference between an element to be coded and its previous element, the probability of the difference being a positive value is higher than the probability of the difference being a negative value.
However, since the code length of the positive value of the signed Exp-Golomb code used in H.264 is equal to that of the negative value, the amount of code of the quantization matrix will be increased.